export interface ResponseData {
    message: string,
    code: number,
    ok: boolean
}
export interface Record {
    id?: number | undefined,
    createTime?: string,
    updateTime?: string,
    roleName?: string,
    remark?: null
}

export type RecordsData = Record[]

// 定义接口返回数据的ts类型
export interface RecordsResponseData extends ResponseData {
    data: {
        records: RecordsData,
        total: number,
        size: number,
        current: number,
        orders?: [],
        optimizeCountSql?: boolean,
        hitCount?: boolean,
        countId?: null,
        maxLimit?: null,
        searchCount?: boolean,
        pages: number
    }
}
// 添加或者修改接口请求需要的数据
export interface AddOrUpdateRole {
    createTime?: string,
    id?: number,
    remark?: string,
    roleName?: string,
    updateTime?: string
}

// 菜单与按钮权限的ts类型
export interface MenuData {
    id: number,
    createTime: string,
    updateTime: string,
    pid: number,
    name: string,
    code: string,
    toCode: string,
    type: number,
    status: null,
    level: number, //区分等级
    children?: MenuList,
    select: boolean
}
export type MenuList = MenuData[]
// 修改权限接口返回的ts类型
export interface MenuResponseData extends ResponseData {
    data: MenuList
}
